Skip to content

RectFEdit

Base classes

Name Children Inherits
BaseRectEdit
prettyqt.custom_widgets.editors.rectedit

⋔ Inheritance diagram

graph TD
  375356104["custom_widgets.RectFEdit"]
  940209780["custom_widgets.BaseRectEdit"]
  3664736470["widgets.Widget"]
  829357528["widgets.WidgetMixin"]
  3227531497["core.ObjectMixin"]
  2751680898["builtins.object"]
  625385617["gui.PaintDeviceMixin"]
  3620195106["QtWidgets.QWidget"]
  3984060476["QtCore.QObject"]
  37984305["Shiboken.Object"]
  673956333["QtGui.QPaintDevice"]
  940209780 --> 375356104
  3664736470 --> 940209780
  829357528 --> 3664736470
  3227531497 --> 829357528
  2751680898 --> 3227531497
  625385617 --> 829357528
  2751680898 --> 625385617
  2751680898 --> 829357528
  3620195106 --> 3664736470
  3984060476 --> 3620195106
  37984305 --> 3984060476
  2751680898 --> 37984305
  673956333 --> 3620195106
  37984305 --> 673956333

🛈 DocStrings

Bases: BaseRectEdit

Source code in prettyqt/custom_widgets/editors/rectedit.py
class RectFEdit(BaseRectEdit):
    Typ = core.QRectF
    Widget = widgets.DoubleSpinBox
    value_changed = core.Signal(core.QRectF)
    spinbox_x: widgets.DoubleSpinBox
    spinbox_y: widgets.DoubleSpinBox
    spinbox_width: widgets.DoubleSpinBox
    spinbox_height: widgets.DoubleSpinBox

    def set_value(self, value: datatypes.RectFType):
        super().set_value(datatypes.to_rectf(value))

    def get_value(self) -> core.RectF:
        return core.RectF(
            self.spinbox_x.value(),
            self.spinbox_y.value(),
            self.spinbox_width.value(),
            self.spinbox_height.value(),
        )

    value = core.Property(
        core.QRectF,
        get_value,
        set_value,
        user=True,
        doc="Current value",
    )

:fa-brands-github: Show source on GitHub